home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 147 / Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z / Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin / tools / ws / wst.c < prev    next >
C/C++ Source or Header  |  2000-05-05  |  28KB  |  541 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int namebt(int data);
  5. void main(int argc, char *argv[])
  6. {
  7.         FILE *fp1,*fp2;
  8.         int d,i,j,m,datai;
  9.         char datac;
  10.         char sa,sb;
  11.         
  12.         printf("wst.x ver. 0.01      1999,2000 Takeo Koba\n\n");
  13.  
  14.         if((fp1=fopen(argv[1],"rb"))==NULL){      /* ファイルオープン */
  15.                 printf("\n wst.x [TEAM DATA FILE] <[SAVE DATA TEXT]>\n");
  16.                 exit(1);
  17.         }
  18.         if((fp2=fopen(argv[2],"wt"))==NULL){      /* ファイルオープン */
  19.                 if((fp2=fopen("WS_TEAM.txt","wt"))==NULL){      /* ファイルオープン */
  20.                         printf("\n savefile open error! \n");
  21.                         exit(1);
  22.                 }
  23.         }
  24.  
  25.         for(j = 0;j < 12;j++){
  26.                 switch(j){
  27.                         case  0:fprintf(fp2,"\nGチーム\n\n");break;
  28.                         case  1:fprintf(fp2,"\nCチーム\n\n");break;
  29.                         case  2:fprintf(fp2,"\nDチーム\n\n");break;
  30.                         case  3:fprintf(fp2,"\nSチーム\n\n");break;
  31.                         case  4:fprintf(fp2,"\nWチーム\n\n");break;
  32.                         case  5:fprintf(fp2,"\nTチーム\n\n");break;
  33.                         case  6:fprintf(fp2,"\nLチーム\n\n");break;
  34.                         case  7:fprintf(fp2,"\nBチーム\n\n");break;
  35.                         case  8:fprintf(fp2,"\nHチーム\n\n");break;
  36.                         case  9:fprintf(fp2,"\nFチーム\n\n");break;
  37.                         case 10:fprintf(fp2,"\nOチーム\n\n");break;
  38.                         case 11:fprintf(fp2,"\nBuチーム\n\n");break;
  39.                 }
  40.                 printf("%dチーム目・・・\n",j+1);
  41.                 
  42.                 for(m = 0;m < 0x08;m++){
  43.                         for(i = 0;i < 0x13;i++){
  44.                                 if(i == 0){
  45.                                         datai=fgetc(fp1);
  46.                                         fprintf(fp2,"%d. ",datai+1);
  47.                                 }
  48.                                 if((i > 0)&&(i < 7)){
  49.                                         datai=fgetc(fp1);
  50.                                         d = namebt(datai);
  51.                                         sa = d / 0x100;sb = d % 0x100;
  52.                                         fprintf(fp2,"%c%c",sa,sb);
  53.                                 }
  54.                                 if(i == 7){
  55.                                         datai=fgetc(fp1);
  56.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  57.                                         else fprintf(fp2," %d ",datai);
  58.                                 }
  59.                                 if(i == 8){
  60.                                         datai=fgetc(fp1);
  61.                                         if((datai%2) == 0) fprintf(fp2,"R  ");
  62.                                         else if((datai%2) == 1) fprintf(fp2,"L  ");
  63.                                         else fprintf(fp2,"?  ");
  64.                                         
  65.                                 }
  66.                                 if(i == 9){
  67.                                         datai=fgetc(fp1);
  68.                                         fprintf(fp2,"%d ",(datai>>4)%4);
  69.                                         fprintf(fp2,"%d ",(datai>>2)%4);
  70.                                         if(datai%2) fprintf(fp2,"黒 ");
  71.                                         else fprintf(fp2,"木 ");
  72.                                 }
  73.                                 if(i == 0x0a){
  74.                                         datai=fgetc(fp1);
  75.                                         switch(datai){
  76.                                                 case 1:fprintf(fp2,"P ");break;
  77.                                                 case 2:fprintf(fp2,"C ");break;
  78.                                                 case 3:fprintf(fp2,"1B");break;
  79.                                                 case 4:fprintf(fp2,"2B");break;
  80.                                                 case 5:fprintf(fp2,"3B");break;
  81.                                                 case 6:fprintf(fp2,"SS");break;
  82.                                                 case 7:fprintf(fp2,"LF");break;
  83.                                                 case 8:fprintf(fp2,"CF");break;
  84.                                                 case 9:fprintf(fp2,"RF");break;
  85.                                                 default:fprintf(fp2,"- ");break;
  86.                                         }
  87.                                 }
  88.                                 if(i == 0x0b){
  89.                                         datai=fgetc(fp1);
  90.                                         fprintf(fp2," .%d ",datai+150);
  91.                                 }
  92.                                 if(i == 0x0c){
  93.                                         datai=fgetc(fp1);
  94.                                         if(datai<10) fprintf(fp2," %d ",datai);
  95.                                         else fprintf(fp2,"%d ",datai);
  96.                                 }
  97.                                 if(i == 0x0d) datai=fgetc(fp1);
  98.                                 if(i == 0x0e){
  99.                                         datai=fgetc(fp1);
  100.                                         if(datai) fprintf(fp2," ON ");
  101.                                         else fprintf(fp2," OFF");
  102.                                 }
  103.                                 if(i == 0x0f){
  104.                                         datai=fgetc(fp1);
  105.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  106.                                         else fprintf(fp2," %d ",datai);
  107.                                 }
  108.                                 if(i == 0x10){
  109.                                         datai=fgetc(fp1);
  110.                                         if(datai<10) fprintf(fp2,"  %d - ",datai);
  111.                                         else if(datai==100) fprintf(fp2,"%d - ",datai);
  112.                                         else fprintf(fp2," %d - ",datai);
  113.                                 }
  114.                                 if(i == 0x11){
  115.                                         datai=fgetc(fp1);
  116.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  117.                                         else if(datai==100) fprintf(fp2,"%d ",datai);
  118.                                         else fprintf(fp2," %d ",datai);
  119.                                 }
  120.                                 if(i == 0x12){
  121.                                         datai=fgetc(fp1);
  122.                                         if(datai<20) fprintf(fp2,"  %d\n",datai/2);
  123.                                         else if(datai==200) fprintf(fp2,"%d\n",datai/2);
  124.                                         else fprintf(fp2," %d\n",datai/2);
  125.                                 }
  126.                         }
  127.                         for(i = 0;i < 13;i++) datai=fgetc(fp1);
  128.                 
  129.                 }
  130.                 printf("スタメン野手終了/");
  131.                 fprintf(fp2,"\n");
  132.                 
  133.                 for(m = 0x08;m < 0x0d;m++){
  134.                         for(i = 0;i < 0x13;i++){
  135.                                 if(i == 0){
  136.                                         datai=fgetc(fp1);
  137.                                         fprintf(fp2,"PH ");
  138.                                 }
  139.                                 if((i > 0)&&(i < 7)){
  140.                                         datai=fgetc(fp1);
  141.                                         d = namebt(datai);
  142.                                         sa = d / 0x100;sb = d % 0x100;
  143.                                         fprintf(fp2,"%c%c",sa,sb);
  144.                                 }
  145.                                 if(i == 7){
  146.                                         datai=fgetc(fp1);
  147.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  148.                                         else fprintf(fp2," %d ",datai);
  149.                                 }
  150.                                 if(i == 8){
  151.                                         datai=fgetc(fp1);
  152.                                         if((datai%2) == 0) fprintf(fp2,"R  ");
  153.                                         else if((datai%2) == 1) fprintf(fp2,"L  ");
  154.                                         else fprintf(fp2,"?  ");
  155.                                         
  156.                                 }
  157.                                 if(i == 9){
  158.                                         datai=fgetc(fp1);
  159.                                         fprintf(fp2,"%d ",(datai>>4)%4);
  160.                                         fprintf(fp2,"%d ",(datai>>2)%4);
  161.                                         if(datai%2) fprintf(fp2,"黒 ");
  162.                                         else fprintf(fp2,"木 ");
  163.                                 }
  164.                                 if(i == 0x0a){
  165.                                         datai=fgetc(fp1);
  166.                                         switch(datai){
  167.                                                 case 1:fprintf(fp2,"P ");break;
  168.                                                 case 2:fprintf(fp2,"C ");break;
  169.                                                 case 3:fprintf(fp2,"IF");break;
  170.                                                 case 4:fprintf(fp2,"IF");break;
  171.                                                 case 5:fprintf(fp2,"IF");break;
  172.                                                 case 6:fprintf(fp2,"IF");break;
  173.                                                 case 7:fprintf(fp2,"OF");break;
  174.                                                 case 8:fprintf(fp2,"OF");break;
  175.                                                 case 9:fprintf(fp2,"OF");break;
  176.                                                 default:fprintf(fp2,"- ");break;
  177.                                         }
  178.                                 }
  179.                                 if(i == 0x0b){
  180.                                         datai=fgetc(fp1);
  181.                                         fprintf(fp2," .%d ",datai+150);
  182.                                 }
  183.                                 if(i == 0x0c){
  184.                                         datai=fgetc(fp1);
  185.                                         if(datai<10) fprintf(fp2," %d ",datai);
  186.                                         else fprintf(fp2,"%d ",datai);
  187.                                 }
  188.                                 if(i == 0x0d) datai=fgetc(fp1);
  189.                                 if(i == 0x0e){
  190.                                         datai=fgetc(fp1);
  191.                                         if(datai) fprintf(fp2," ON ");
  192.                                         else fprintf(fp2," OFF");
  193.                                 }
  194.                                 if(i == 0x0f){
  195.                                         datai=fgetc(fp1);
  196.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  197.                                         else fprintf(fp2," %d ",datai);
  198.                                 }
  199.                                 if(i == 0x10){
  200.                                         datai=fgetc(fp1);
  201.                                         if(datai<10) fprintf(fp2,"  %d - ",datai);
  202.                                         else if(datai==100) fprintf(fp2,"%d - ",datai);
  203.                                         else fprintf(fp2," %d - ",datai);
  204.                                 }
  205.                                 if(i == 0x11){
  206.                                         datai=fgetc(fp1);
  207.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  208.                                         else if(datai==100) fprintf(fp2,"%d ",datai);
  209.                                         else fprintf(fp2," %d ",datai);
  210.                                 }
  211.                                 if(i == 0x12){
  212.                                         datai=fgetc(fp1);
  213.                                         if(datai<20) fprintf(fp2,"  %d\n",datai/2);
  214.                                         else if(datai==200) fprintf(fp2,"%d\n",datai/2);
  215.                                         else fprintf(fp2," %d\n",datai/2);
  216.                                 }
  217.                         }
  218.                         for(i = 0;i < 13;i++) datai=fgetc(fp1);
  219.                 }
  220.                 printf("控え野手終了/");
  221.                 fprintf(fp2,"\n");
  222.                 
  223.                 for(m = 0x0d;m < 0x12;m++){
  224.                         for(i = 0;i < 0x17;i++){
  225.                                 if(i == 0){
  226.                                         datai=fgetc(fp1);
  227.                                         if((datai==0x10)||(datai==0x11)) fprintf(fp2,"R. ");
  228.                                         else fprintf(fp2,"S. ");
  229.                                 }
  230.                                 if((i > 0)&&(i < 7)){
  231.                                         datai=fgetc(fp1);
  232.                                         d = namebt(datai);
  233.                                         sa = d / 0x100;sb = d % 0x100;
  234.                                         fprintf(fp2,"%c%c",sa,sb);
  235.                                 }
  236.                                 if(i == 7){
  237.                                         datai=fgetc(fp1);
  238.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  239.                                         else fprintf(fp2," %d ",datai);
  240.                                 }
  241.                                 if(i == 8){
  242.                                         datai=fgetc(fp1);
  243.                                         if((datai%8) == 0) fprintf(fp2,"RO");
  244.                                         else if((datai%8) == 1) fprintf(fp2,"LO");
  245.                                         else if((datai%8) == 4) fprintf(fp2,"RU");
  246.                                         else if((datai%8) == 5) fprintf(fp2,"LU");
  247.                                         else fprintf(fp2,"? ");
  248.                                         
  249.                                 }
  250.                                 if(i == 9){
  251.                                         datai=fgetc(fp1);
  252.                                         fprintf(fp2," %d ",(datai>>4)%4);
  253.                                         fprintf(fp2,"%d ",(datai>>2)%4);
  254.                                         if(datai%2) fprintf(fp2,"黒 ");
  255.                                         else fprintf(fp2,"木 ");
  256.                                 }
  257.                                 if(i == 0x0a){
  258.                                         datai=fgetc(fp1);
  259.                                         switch(datai){
  260.                                                 case 1:fprintf(fp2,"P ");break;
  261.                                                 case 2:fprintf(fp2,"C ");break;
  262.                                                 case 3:fprintf(fp2,"IF");break;
  263.                                                 case 4:fprintf(fp2,"IF");break;
  264.                                                 case 5:fprintf(fp2,"IF");break;
  265.                                                 case 6:fprintf(fp2,"IF");break;
  266.                                                 case 7:fprintf(fp2,"OF");break;
  267.                                                 case 8:fprintf(fp2,"OF");break;
  268.                                                 case 9:fprintf(fp2,"OF");break;
  269.                                                 default:fprintf(fp2,"- ");break;
  270.                                         }
  271.                                 }
  272.                                 if(i == 0x0b){
  273.                                         datai=fgetc(fp1);
  274.                                         if(datai%50<10)fprintf(fp2," %d.0%d ",datai/50,datai%50);
  275.                                         else fprintf(fp2," %d.%d ",datai/50,datai%50);
  276.                                 }
  277.                                 if(i == 0x0c){
  278.                                         datai=fgetc(fp1);
  279.                                         if(datai<10) fprintf(fp2," %d ",datai);
  280.                                         else fprintf(fp2,"%d ",datai);
  281.                                 }
  282.                                 if(i == 0x0d) datai=fgetc(fp1);
  283.                                 if(i == 0x0e){
  284.                                         datai=fgetc(fp1);
  285.                                         if(datai) fprintf(fp2," ON ");
  286.                                         else fprintf(fp2," OFF");
  287.                                 }
  288.                                 if(i == 0x0f){
  289.                                         datai=fgetc(fp1);
  290.                                         if(datai<10) fprintf(fp2,"  %d ",datai);
  291.                                         else fprintf(fp2," %d ",datai);
  292.                                 }
  293.                                 if(i == 0x10){
  294.                                         datai=fgetc(fp1);
  295.                                         if(datai<10) fprintf(fp2,"  %d / ",datai);
  296.                                         else if(datai<100) fprintf(fp2," %d / ",datai);
  297.                                         else fprintf(fp2,"%d / ",datai);
  298.                                 }
  299.                                 if(i == 0x11){
  300.                                         datai=fgetc(fp1);
  301.                                         if(datai<10) fprintf(fp2,"  %d / ",datai);
  302.                                         else if(datai<100) fprintf(fp2," %d / ",datai);
  303.                                         else fprintf(fp2,"%d / ",datai);
  304.                                 }
  305.                                 if(i == 0x12){
  306.                                         datai=fgetc(fp1);
  307.                                         if(datai<10) fprintf(fp2,"  %d  ",datai);
  308.                                         else if(datai<100) fprintf(fp2," %d  ",datai);
  309.                                         else fprintf(fp2,"%d  ",datai);
  310.                                 }
  311.                                 if(i == 0x13){
  312.                                         datai=fgetc(fp1);
  313.                                         if(datai<10) fprintf(fp2," %d - ",datai);
  314.                                         else fprintf(fp2,"%d - ",datai);
  315.                                 }
  316.                                 if(i == 0x14){
  317.                                         datai=fgetc(fp1);
  318.                                         if(datai<10) fprintf(fp2," %d - ",datai);
  319.                                         else fprintf(fp2,"%d - ",datai);
  320.                                 }
  321.                                 if(i == 0x15){
  322.                                         datai=fgetc(fp1);
  323.                                         if(datai<10) fprintf(fp2," %d ",datai);
  324.                                         else fprintf(fp2,"%d ",datai);
  325.                                 }
  326.                                 if(i == 0x16){
  327.                                         datai=fgetc(fp1);
  328.                                         if(datai<10) fprintf(fp2,"  %d\n",datai);
  329.                                         else if(datai==100) fprintf(fp2,"%d\n",datai);
  330.                                         else fprintf(fp2," %d\n",datai);
  331.                                 }
  332.                         }
  333.                         for(i = 0;i < 9;i++) datai=fgetc(fp1);
  334.                 }
  335.                 printf("投手終了/");
  336.                 fprintf(fp2,"\n監 ");
  337.                 
  338.                 for(i = 0;i < 0x17;i++){
  339.                         if((i >= 0)&&(i < 5)){
  340.                                 datai=fgetc(fp1);
  341.                                 d = namebt(datai);
  342.                                 sa = d / 0x100;sb = d % 0x100;
  343.                                 fprintf(fp2,"%c%c",sa,sb);
  344.                         }
  345.                         if(i == 5) datai=fgetc(fp1);
  346.                         if(i == 6){
  347.                                 datai=fgetc(fp1);
  348.                                 if(datai) fprintf(fp2,"   やせ\n\n");
  349.                                 else fprintf(fp2,"   でぶ\n\n");
  350.                         }
  351.                 }
  352.                 for(i = 0;i < 25;i++) datai=fgetc(fp1);
  353.                 printf("終了\n");
  354.         }
  355.         
  356.         fclose(fp1);
  357.         fclose(fp2);
  358. }
  359. int namebt(int data){
  360.         int d;
  361.         switch(data%0x100){
  362.                 case 0x18:d=0x8283;break;
  363.                 case 0x19:d=0x90e6;break;
  364.                 case 0x20:d=0x8140;break;
  365.                 case 0x21:d=0x8149;break;
  366.                 case 0x22:d=0x8168;break;
  367.                 case 0x23:d=0x8194;break;
  368.                 case 0x24:d=0x8190;break;
  369.                 case 0x25:d=0x8193;break;
  370.                 case 0x26:d=0x8195;break;
  371.                 case 0x27:d=0x8166;break;
  372.                 case 0x2a:d=0x8196;break;
  373.                 case 0x2b:d=0x817b;break;
  374.                 case 0x2c:d=0x8165;break;
  375.                 case 0x2d:d=0x817c;break;
  376.                 case 0x2e:d=0x8145;break;
  377.                 case 0x2f:d=0x815e;break;
  378.                 case 0x30:d=0x814f;break;
  379.                 case 0x31:d=0x8150;break;
  380.                 case 0x32:d=0x8151;break;
  381.                 case 0x33:d=0x8152;break;
  382.                 case 0x34:d=0x8153;break;
  383.                 case 0x35:d=0x8154;break;
  384.                 case 0x36:d=0x8155;break;
  385.                 case 0x37:d=0x8156;break;
  386.                 case 0x38:d=0x8157;break;
  387.                 case 0x39:d=0x8158;break;
  388.                 case 0x3a:d=0x8146;break;
  389.                 case 0x3b:d=0x8147;break;
  390.                 case 0x3c:d=0x8183;break;
  391.                 case 0x3d:d=0x8181;break;
  392.                 case 0x3e:d=0x8184;break;
  393.                 case 0x3f:d=0x8148;break;
  394.                 case 0x40:d=0x8197;break;
  395.                 case 0x41:d=0x8260;break;
  396.                 case 0x42:d=0x8261;break;
  397.                 case 0x43:d=0x8262;break;
  398.                 case 0x44:d=0x8263;break;
  399.                 case 0x45:d=0x8264;break;
  400.                 case 0x46:d=0x8265;break;
  401.                 case 0x47:d=0x8266;break;
  402.                 case 0x48:d=0x8267;break;
  403.                 case 0x49:d=0x8268;break;
  404.                 case 0x4a:d=0x8269;break;
  405.                 case 0x4b:d=0x826a;break;
  406.                 case 0x4c:d=0x826b;break;
  407.                 case 0x4d:d=0x826c;break;
  408.                 case 0x4e:d=0x826d;break;
  409.                 case 0x4f:d=0x826e;break;
  410.                 case 0x50:d=0x826f;break;
  411.                 case 0x51:d=0x8270;break;
  412.                 case 0x52:d=0x8271;break;
  413.                 case 0x53:d=0x8272;break;
  414.                 case 0x54:d=0x8273;break;
  415.                 case 0x55:d=0x8274;break;
  416.                 case 0x56:d=0x8275;break;
  417.                 case 0x57:d=0x8276;break;
  418.                 case 0x58:d=0x8277;break;
  419.                 case 0x59:d=0x8278;break;
  420.                 case 0x5a:d=0x8279;break;
  421.                 case 0x80:d=0x82a0;break;
  422.                 case 0x81:d=0x82a2;break;
  423.                 case 0x82:d=0x82a4;break;
  424.                 case 0x83:d=0x82a6;break;
  425.                 case 0x84:d=0x82a8;break;
  426.                 case 0x85:d=0x82a9;break;
  427.                 case 0x86:d=0x82ab;break;
  428.                 case 0x87:d=0x82ad;break;
  429.                 case 0x88:d=0x82af;break;
  430.                 case 0x89:d=0x82b1;break;
  431.                 case 0x8a:d=0x82b3;break;
  432.                 case 0x8b:d=0x82b5;break;
  433.                 case 0x8c:d=0x82b7;break;
  434.                 case 0x8d:d=0x82b9;break;
  435.                 case 0x8e:d=0x82bb;break;
  436.                 case 0x8f:d=0x82bd;break;
  437.                 case 0x90:d=0x82bf;break;
  438.                 case 0x91:d=0x82c2;break;
  439.                 case 0x92:d=0x82c4;break;
  440.                 case 0x93:d=0x82c6;break;
  441.                 case 0x94:d=0x82c8;break;
  442.                 case 0x95:d=0x82c9;break;
  443.                 case 0x96:d=0x82ca;break;
  444.                 case 0x97:d=0x82cb;break;
  445.                 case 0x98:d=0x82cc;break;
  446.                 case 0x99:d=0x82cd;break;
  447.                 case 0x9a:d=0x82d0;break;
  448.                 case 0x9b:d=0x82d3;break;
  449.                 case 0x9c:d=0x82d6;break;
  450.                 case 0x9d:d=0x82d9;break;
  451.                 case 0x9e:d=0x82dc;break;
  452.                 case 0x9f:d=0x82dd;break;
  453.                 case 0xa0:d=0x82de;break;
  454.                 case 0xa1:d=0x82df;break;
  455.                 case 0xa2:d=0x82e0;break;
  456.                 case 0xa3:d=0x82e2;break;
  457.                 case 0xa4:d=0x82e4;break;
  458.                 case 0xa5:d=0x82e6;break;
  459.                 case 0xa6:d=0x82e7;break;
  460.                 case 0xa7:d=0x82e8;break;
  461.                 case 0xa8:d=0x82e9;break;
  462.                 case 0xa9:d=0x82ea;break;
  463.                 case 0xaa:d=0x82eb;break;
  464.                 case 0xab:d=0x82ed;break;
  465.                 case 0xac:d=0x82f0;break;
  466.                 case 0xad:d=0x82f1;break;
  467.                 case 0xae:d=0x82c1;break;
  468.                 case 0xaf:d=0x82e1;break;
  469.                 case 0xb0:d=0x82e3;break;
  470.                 case 0xb1:d=0x82e5;break;
  471.                 case 0xb2:d=0x814a;break;
  472.                 case 0xb3:d=0x814b;break;
  473.                 case 0xb4:d=0x8341;break;
  474.                 case 0xb5:d=0x8343;break;
  475.                 case 0xb6:d=0x8345;break;
  476.                 case 0xb7:d=0x8347;break;
  477.                 case 0xb8:d=0x8349;break;
  478.                 case 0xb9:d=0x834a;break;
  479.                 case 0xba:d=0x834c;break;
  480.                 case 0xbb:d=0x834e;break;
  481.                 case 0xbc:d=0x8350;break;
  482.                 case 0xbd:d=0x8352;break;
  483.                 case 0xbe:d=0x8354;break;
  484.                 case 0xbf:d=0x8356;break;
  485.                 case 0xc0:d=0x8358;break;
  486.                 case 0xc1:d=0x835a;break;
  487.                 case 0xc2:d=0x835c;break;
  488.                 case 0xc3:d=0x835e;break;
  489.                 case 0xc4:d=0x8360;break;
  490.                 case 0xc5:d=0x8363;break;
  491.                 case 0xc6:d=0x8365;break;
  492.                 case 0xc7:d=0x8367;break;
  493.                 case 0xc8:d=0x8369;break;
  494.                 case 0xc9:d=0x836a;break;
  495.                 case 0xca:d=0x836b;break;
  496.                 case 0xcb:d=0x836c;break;
  497.                 case 0xcc:d=0x836d;break;
  498.                 case 0xcd:d=0x836e;break;
  499.                 case 0xce:d=0x8371;break;
  500.                 case 0xcf:d=0x8374;break;
  501.                 case 0xd0:d=0x8377;break;
  502.                 case 0xd1:d=0x837a;break;
  503.                 case 0xd2:d=0x837d;break;
  504.                 case 0xd3:d=0x837e;break;
  505.                 case 0xd4:d=0x8380;break;
  506.                 case 0xd5:d=0x8381;break;
  507.                 case 0xd6:d=0x8382;break;
  508.                 case 0xd7:d=0x8384;break;
  509.                 case 0xd8:d=0x8386;break;
  510.                 case 0xd9:d=0x8388;break;
  511.                 case 0xda:d=0x8389;break;
  512.                 case 0xdb:d=0x838a;break;
  513.                 case 0xdc:d=0x838b;break;
  514.                 case 0xdd:d=0x838c;break;
  515.                 case 0xde:d=0x838d;break;
  516.                 case 0xdf:d=0x838f;break;
  517.                 case 0xe0:d=0x8392;break;
  518.                 case 0xe1:d=0x8393;break;
  519.                 case 0xe2:d=0x8362;break;
  520.                 case 0xe3:d=0x8383;break;
  521.                 case 0xe4:d=0x8385;break;
  522.                 case 0xe5:d=0x8387;break;
  523.                 case 0xe6:d=0x8340;break;
  524.                 case 0xe7:d=0x8342;break;
  525.                 case 0xe8:d=0x8344;break;
  526.                 case 0xe9:d=0x8346;break;
  527.                 case 0xea:d=0x8348;break;
  528.                 case 0xeb:d=0x815b;break;
  529.                 case 0xec:d=0x89f1;break;
  530.                 case 0xed:d=0x967b;break;
  531.                 case 0xee:d=0x9668;break;
  532.                 case 0xef:d=0x8945;break;
  533.                 case 0xfc:d=0x8db6;break;
  534.                 case 0xfd:d=0x8141;break;
  535.                 case 0xfe:d=0x8142;break;
  536.                 case 0xff:d=0x81a1;break;
  537.                 default:d=0x8140;break;
  538.         }
  539.         return d;
  540. }
  541.